	function setCSS(elem, styleName, value, state){
		
		if(styleName == "text-decoration"){
			if(state == 1){
				addTextDecoration(elem, value)	
			} else if(state == 0){

				
				//addTextDecoration(elem, value)
			}
		} else {
			$(elem).css(styleName, value);
		}
	}

$(document).bind("ready", function(){
	$(".butterButton").bind('mousedown', function(){
		action = true;
	});
	
	spanParentsStyle = function(range, prop, val){
		
		returnValue = 0;
		
		$(range.startContainer).parents().each(function(){
			
			if(this.nodeType == 1 & $(this).css(prop) == val){
				returnValue = 1;
				return returnValue;	
			}
		});	
		
		return returnValue;
	}
	
	function mergeRangeFunc(temp, css){
		var range = window.getSelection().getRangeAt(0);
		
		var span = document.createElement("span");
	
		$(span).addClass("test");
	
		$(span).css(css);
		
		var tempContent = temp.textContent;
		
		span.appendChild(document.createTextNode(tempContent));
						
		return span;			
	}
	
	// set the CSS of a division

	
	$("div span").bind("dblclick", function(event){
		event.preventDefault();
		return false;
	})
	


})